<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function second(s) {
      let h = parseInt(s / 60 / 60 % 24)
      let m = parseInt(s / 60 % 60)
      s = parseInt(s % 60)
      h = h > 10 ? h : '0' + h
      m = m > 10 ? m : '0' + m
      s = s > 10 ? s : '0' + s
      document.write(`${h}小时:${m}分钟:${s}秒`)
    }
    let secondd = prompt('请输入秒数')
    second(secondd)
  </script>
</body>

</html>